haxiomic / dts2hx

Converts TypeScript definition files (d.ts) to haxe externs (.hx) via the TypeScript compiler API
MIT License
131 stars 8 forks source link

[ERROR] No matching export in "utils/BufferGeometryUtils.js" for import "BufferGeometryUtils" #114

Closed sonygod closed 2 years ago

sonygod commented 2 years ago

X [ERROR] No matching export in "node_modules/three/examples/jsm/utils/BufferGeometryUtils.js" for import "BufferGeometryUtils"

three.js r138

package three.examples.jsm.utils;

@:js.import("three/examples/jsm/utils/BufferGeometryUtils.js","BufferGeometryUtils") @valueModuleOnly extern class BufferGeometryUtils {
    static function mergeBufferGeometries(geometries:Array<three.BufferGeometry>, ?useGroups:Bool):three.BufferGeometry;
    static function mergeBufferAttributes(attributes:Array<three.BufferAttribute>):three.BufferAttribute;
    static function interleaveAttributes(attributes:Array<three.BufferAttribute>):three.InterleavedBufferAttribute;
    static function estimateBytesUsed(geometry:three.BufferGeometry):Float;
    static function mergeVertices(geometry:three.BufferGeometry, ?tolerance:Float):three.BufferGeometry;
    static function toTrianglesDrawMode(geometry:three.BufferGeometry, drawMode:three.TrianglesDrawModes):three.BufferGeometry;
    static function computeMorphedAttributes(object:ts.AnyOf3<three.Mesh<three.BufferGeometry, ts.AnyOf2<three.Material, Array<three.Material>>>, three.Line<three.BufferGeometry, ts.AnyOf2<three.Material, Array<three.Material>>>, three.Points<three.BufferGeometry, ts.AnyOf2<three.Material, Array<three.Material>>>>):Dynamic;
}

and the d.ts

import {
    BufferAttribute,
    BufferGeometry,
    InterleavedBufferAttribute,
    TrianglesDrawModes,
    Mesh,
    Line,
    Points,
} from '../../../src/Three';

export function mergeBufferGeometries(geometries: BufferGeometry[], useGroups?: boolean): BufferGeometry;
export function mergeBufferAttributes(attributes: BufferAttribute[]): BufferAttribute;
export function interleaveAttributes(attributes: BufferAttribute[]): InterleavedBufferAttribute;
export function estimateBytesUsed(geometry: BufferGeometry): number;
export function mergeVertices(geometry: BufferGeometry, tolerance?: number): BufferGeometry;
export function toTrianglesDrawMode(geometry: BufferGeometry, drawMode: TrianglesDrawModes): BufferGeometry;
export function computeMorphedAttributes(object: Mesh | Line | Points): object;
sonygod commented 2 years ago

hello @haxiomic

I return to

@:jsRequire("three/examples/jsm/utils/BufferGeometryUtils") @valueModuleOnly extern class BufferGeometryUtils

still not work.

sonygod commented 2 years ago

@:jsRequire("three","BufferGeometryUtils") @valueModuleOnly extern class BufferGeometryUtils {