From 3a8aadde8fbceaf599bde9be121a09508edc8760 Mon Sep 17 00:00:00 2001 From: electricessence Date: Mon, 11 Aug 2014 11:44:18 -0700 Subject: [PATCH] Updates for current compatibility... 1) Make Object3D inherit from EventDispatcher because it does... 2) Add setSize and domElement to Renderer interface because they are commonly used in boilerplate and it's better to return a "Renderer" depending on what is available. 3) Update ParticleSystemMaterial to PointCloudMaterial since ParticleSystemMaterial is deprecated. --- threejs/three.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/threejs/three.d.ts b/threejs/three.d.ts index 7489001666..371e37da05 100644 --- a/threejs/three.d.ts +++ b/threejs/three.d.ts @@ -891,7 +891,7 @@ declare module THREE { /** * Base class for scene graph objects */ - export class Object3D { + export class Object3D extends EventDispatcher { constructor(); /** @@ -2169,7 +2169,7 @@ declare module THREE { clone(): MeshPhongMaterial; } - export interface ParticleSystemMaterialParameters { + export interface PointCloutMaterialParameters { color?: number; map?: Texture; size?: number; @@ -2178,7 +2178,7 @@ declare module THREE { fog?: boolean; } - export class ParticleSystemMaterial extends Material { + export class PointCloudMaterial extends Material { constructor(parameters?: ParticleSystemMaterialParameters); color: Color; map: Texture; @@ -3806,9 +3806,9 @@ declare module THREE { * @param geometry An instance of Geometry. * @param material An instance of Material (optional). */ - constructor(geometry: Geometry, material?: ParticleSystemMaterial); + constructor(geometry: Geometry, material?: PointCloudMaterial); constructor(geometry: Geometry, material?: ShaderMaterial); - constructor(geometry: BufferGeometry, material?: ParticleSystemMaterial); + constructor(geometry: BufferGeometry, material?: PointCloudMaterial); constructor(geometry: BufferGeometry, material?: ShaderMaterial); /** @@ -3872,6 +3872,8 @@ declare module THREE { export interface Renderer { render(scene: Scene, camera: Camera): void; + setSize(width:number, height:number, updateStyle?:boolean): void; + domElement: HTMLCanvasElement; } export interface CanvasRendererParameters {