在2d HTML5画布上的3d元素

时间:2015-08-18 09:35:58

标签: html5 canvas 3d three.js 2d

我正在使用---- 2015.08.17 11:34:05:307 INFO: ----------------------------------------------------------- CallCtlConnDialingEv received for call: (P2-CTIUser) GCID=(1,10603678)->ACTIVE CiscoConnection Control ConnectionCiscoConnection hashCode(event): 24546998 ConnectionID(event): 26165083 CallControlCause(event): 110 CalledAddress(event): null CallingAddress(event): 1044 CallingTerminal(event): SEPCCD539D74CF7 LastRedirectedAddress(event): null CurrentCalledAddress(call): null CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): null CallingAddress(call): 1044 CallingTerminal(call): SEPCCD539D74CF7 Address(Connection): 1044 ----------------------------------------------------------- ---- 2015.08.17 11:34:05:310 INFO: ----------------------------------------------------------- CallCtlTermConnTalkingEv SEPCCD539D74CF7 received for call: (P2-CTIUser) GCID=(1,10603678)->ACTIVE CiscoConnection Control Terminal ConnectionTerminalConnection hashCode(event): 21444301 CallControlCause(event): 110 CalledAddress(event): null CallingAddress(event): 1044 CallingTerminal(event): SEPCCD539D74CF7 LastRedirectedAddress(event): null CurrentCalledAddress(call): 9106 CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): 9106 CallingAddress(call): 1044 CallingTerminal(call): SEPCCD539D74CF7 ----------------------------------------------------------- ---- 2015.08.17 11:34:05:311 INFO: ----------------------------------------------------------- CallCtlConnEstablishedEv received for call: (P2-CTIUser) GCID=(1,10603678)->ACTIVE CiscoConnection Control ConnectionCiscoConnection hashCode(event): 24546998 ConnectionID(event): 26165083 CallControlCause(event): 100 CalledAddress(event): 9106 CallingAddress(event): 1044 CallingTerminal(event): SEPCCD539D74CF7 LastRedirectedAddress(event): null CurrentCalledAddress(call): 9106 CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): 9106 CallingAddress(call): 1044 CallingTerminal(call): SEPCCD539D74CF7 Address(Connection): 1044 ----------------------------------------------------------- ---- 2015.08.17 11:34:05:316 INFO: ----------------------------------------------------------- CallCtlConnNetworkReachedEv received for call: (P2-CTIUser) GCID=(1,10603678)->ACTIVE CiscoConnection Control ConnectionCiscoConnection hashCode(event): 28047486 ConnectionID(event): 0 CallControlCause(event): -1 CalledAddress(event): 9106 CallingAddress(event): 1044 CallingTerminal(event): SEPCCD539D74CF7 LastRedirectedAddress(event): null CurrentCalledAddress(call): 9106 CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): 9106 CallingAddress(call): 1044 CallingTerminal(call): SEPCCD539D74CF7 Address(Connection): 9106 ----------------------------------------------------------- ---- 2015.08.17 11:34:05:319 INFO: ----------------------------------------------------------- CallCtlConnNetworkAlertingEv received for call: (P2-CTIUser) GCID=(1,10603678)->ACTIVE CiscoConnection Control ConnectionCiscoConnection hashCode(event): 28047486 ConnectionID(event): 0 CallControlCause(event): 100 CalledAddress(event): 9106 CallingAddress(event): 1044 CallingTerminal(event): SEPCCD539D74CF7 LastRedirectedAddress(event): null CurrentCalledAddress(call): 9106 CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): 9106 CallingAddress(call): 1044 CallingTerminal(call): SEPCCD539D74CF7 Address(Connection): 9106 ----------------------------------------------------------- ---- 2015.08.17 11:34:05:482 INFO: ----------------------------------------------------------- CallCtlConnEstablishedEv received for call: (P2-CTIUser) GCID=(1,10603678)->ACTIVE CiscoConnection Control ConnectionCiscoConnection hashCode(event): 28047486 ConnectionID(event): 0 CallControlCause(event): 100 CalledAddress(event): 9106 CallingAddress(event): 1044 CallingTerminal(event): SEPCCD539D74CF7 LastRedirectedAddress(event): null CurrentCalledAddress(call): 9106 CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): 9106 CallingAddress(call): 1044 CallingTerminal(call): SEPCCD539D74CF7 Address(Connection): 9106 ----------------------------------------------------------- ---- 2015.08.17 11:34:08:409 INFO: ----------------------------------------------------------- CallCtlConnOfferedEv received for call: (P2-CTIUser) GCID=(1,10603679)->ACTIVE CiscoConnection Control ConnectionCiscoConnection hashCode(event): 16848708 ConnectionID(event): 26165086 CallControlCause(event): 110 CalledAddress(event): 1056 CallingAddress(event): 1044 CallingTerminal(event): Callisto_SIP_Tr LastRedirectedAddress(event): null CurrentCalledAddress(call): 1056 CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): 1056 CallingAddress(call): 1044 CallingTerminal(call): Callisto_SIP_Tr Address(Connection): 1056 ----------------------------------------------------------- ---- 2015.08.17 11:34:08:410 INFO: ----------------------------------------------------------- CallCtlConnEstablishedEv received for call: (P2-CTIUser) GCID=(1,10603679)->ACTIVE CiscoConnection Control ConnectionCiscoConnection hashCode(event): 18484547 ConnectionID(event): 0 CallControlCause(event): 110 CalledAddress(event): 1056 CallingAddress(event): 1044 CallingTerminal(event): Callisto_SIP_Tr LastRedirectedAddress(event): null CurrentCalledAddress(call): 1056 CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): 1056 CallingAddress(call): 1044 CallingTerminal(call): Callisto_SIP_Tr Address(Connection): 1044 ----------------------------------------------------------- ---- 2015.08.17 11:34:08:593 INFO: ----------------------------------------------------------- CallCtlConnAlertingEv received for call: (P2-CTIUser) GCID=(1,10603679)->ACTIVE CiscoConnection Control ConnectionCiscoConnection hashCode(event): 16848708 ConnectionID(event): 26165086 CallControlCause(event): 100 CalledAddress(event): 1056 CallingAddress(event): 1044 CallingTerminal(event): Callisto_SIP_Tr LastRedirectedAddress(event): null CurrentCalledAddress(call): 1056 CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): 1056 CallingAddress(call): 1044 CallingTerminal(call): Callisto_SIP_Tr Address(Connection): 1056 ----------------------------------------------------------- ---- 2015.08.17 11:34:08:595 INFO: ----------------------------------------------------------- CallCtlTermConnRingingEvImpl SEPD824BDBA6DA7 received for call: (P2-CTIUser) GCID=(1,10603679)->ACTIVE CiscoConnection Control Terminal ConnectionTerminalConnection hashCode(event): 2788310 CallControlCause(event): 100 CalledAddress(event): 1056 CallingAddress(event): 1044 CallingTerminal(event): Callisto_SIP_Tr LastRedirectedAddress(event): null CurrentCalledAddress(call): 1056 CurrentCallingAddress(call): 1044 IsCiscoConferenceCall(call): false CalledAddress(call): 1056 CallingAddress(call): 1044 CallingTerminal(call): Callisto_SIP_Tr ----------------------------------------------------------- Canvas进行2D游戏,我想在2D画布上添加3d角色。

在单独的“隐藏”画布上使用// ... rest of OP's code public String[] nextLine() throws IOException { final String line = br.readLine(); if(line == null) { return null; } String columns[] = line.split(DELIMITER, -1); for(int i = 0; i < columns.length; i++) { if(columns[i].isEmpty()) { columns[i] = null; } } return columns; } 是一个好的(甚至是可能的)解决方案,每个3d角色1个。但是,然后将这些“3d”画布画到主要的2d画布上?

我可以在'2d'画布上绘制HTML5画布吗?

此解决方案存在任何潜在问题?

是否会违反任何“最佳做法”?

我的直觉是这是一个很好的方式。

1 个答案:

答案 0 :(得分:0)

Webgl使用webgl个上下文,而不是2d。为什么需要不同的画布层?无论如何你可以通过设置透明背景来做到这一点,但这对你的浏览器来说会很重。您可以在单个webgl上下文中执行的操作(可能在您需要的其他2d上下文之上)是使用不同的字符呈现不同的场景,结果将是相同的