three-edit-cores 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/index.js +7607 -7554
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,6 +81,19 @@ scene.environmentEnabled = true // 开启环境贴图
|
|
|
81
81
|
scene.envBackground = null // 清空环境贴图
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
+
```js
|
|
85
|
+
scene.ADDCALL?.(obj) // 场景添加回调 scene.ADDCALL = (obj) => 每次有物体添加都会回调
|
|
86
|
+
|
|
87
|
+
scene.REMOVECALL?.(obj) // 场景移除回调 scene.REMOVECALL = (obj) => 每次有物体移除都会回调
|
|
88
|
+
|
|
89
|
+
obj.ADDCALL?.() // 物体添加场景的时候调用例如 group.ADDCALL = () => console.log('group添加到场景了')
|
|
90
|
+
|
|
91
|
+
obj.REMOVECALL?.() // 物体从场景移除的时候调用例如 group.REMOVECALL = () => console.log('group从场景移除了')
|
|
92
|
+
|
|
93
|
+
obj.SET_STORAGE_CALL?.(storage) // 物体存储赋值后调用 例如 group.SET_STORAGE_CALL = (storage) => console.log('group存储了', storage)
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
|
|
84
97
|
### 自定义3D 组件
|
|
85
98
|
|
|
86
99
|
```js
|
|
@@ -102,6 +115,8 @@ scene.envBackground = null // 清空环境贴图
|
|
|
102
115
|
|
|
103
116
|
create: (storage, args, cores) => mesh
|
|
104
117
|
}
|
|
118
|
+
|
|
119
|
+
mesh.disBlendShader = true // 禁用配置着色面板
|
|
105
120
|
*/
|
|
106
121
|
ThreeEditor.__DESIGNS__.push(component)
|
|
107
122
|
```
|