Custom template and bundling

Another reason is probably that your dont include the code with type module

What code and where I am I including it?

Iā€™ve tried adding type=module to the <needle-component/>

by user 285903863339548673

Iā€™m comparing a lot of this to the React template i.e. pasting it over, so Iā€™m not sure why much more configuration is necessary

by user 285903863339548673

I mean the script include in your root index html

Still no luck, unfortunately!

by user 285903863339548673

Hi @marcel :cactus:, do you have any other ideas/suggestions?

At the moment I still havenā€™t been able to integrate needle into my own web project set ups, and have relied on the needle templates which isnā€™t ideal.

Thanks

by user 285903863339548673

@marcel :cactus: @herbstā€‹:cactus:

Hi, I donā€™t feel best advised with this - I am a Pro subscriber and so far I donā€™t feel like the additional cost is reflected in the support

by user 285903863339548673

Did you report a bug with your specific project setup already / could you do that? Or just the zip file above?

Please note that ā€žsupportā€œ included in Pro doesnā€™t mean we can do custom work for you, and a Pro license is required for certain usages and revenues, itā€™s not a ā€žchoiceā€œ to use Indie or Pro. As you know weā€™re always happy to help but there are limits where it becomes essentially custom contract work for very specific usages. As a point of reference, the level of support weā€™re often giving here ā€” taking a look at user projects and pointing out issues ā€” typically costs between 20k and 250k per year for Unity/Unreal.

As said, would be great if you could please report a bug with repro steps so that we can take a closer look. We certainly want you to succeed.

I certainly donā€™t expect support to mean project development(!)
But at the very least I expect the Needle team to reply and give some direction. You can see in this thread that communication abruptly ends

It seems like Needle users go through the same avenue for support, with users getting somewhat equal amounts of assistance - whereas the Pro pricing tier highlights the Priority Support

I have been trying to create a custom web project, using parcel as my bundler, but have encountered issues that seem to point to the needle-engine component.

I am not familiar with bug reports or where to report them

by user 285903863339548673

Itā€™s certainly at our discretion what amount of support we give for users that donā€™t have a valid license ā€“ we just happen to be nice people that want our users to succeed :slightly_smiling_face:

And, definitely thanks for pinging this thread again ā€“ sometimes threads fall ā€œthrough the cracksā€, but not with the intent of abandoning you / the thread.

In Unity you can select ā€œNeedle Engine > Report a bug > Create Bug Reportā€, then a file will pop up where you can add more info

@BOTBOT please update to parcel 2 to fix the issue - itā€™s related to parcel 1 not being able to handle ESM modules. You can find an upgrade guide here: Migration

I basically only changed the import to module as mentioned before <script type="module" src="index.tsx"></script>

Package.json "parcel": "^2.0.0"

and

import "@needle-tools/engine";
import "./generated/gen.js"

import { NeedleEngineAttributes } from "@needle-tools/engine";
import React, { ReactElement, useRef } from 'react'
  
export function NeedleEngine(props: NeedleEngineAttributes | { children?: any }): ReactElement<NeedleEngineAttributes> {
    return <needle-engine {...props}>
        {props.children}
    </needle-engine>;
}

Capto_Capture_2024-01-23_11-28-11_PM.png

the only thing I havent figured out yet is how to get parcel to serve the ā€œassetsā€ folder as well - perhaps you know more about that (including folders or where the assets folder needs to be in the project)

Modified start to copy the assets folder which seems to do the trick:
"start": "cp -R ./assets ./dist/assets && parcel src/index.html"
hope this helps you Copy all files from a predefined folder into the dist folder Ā· Issue #1411 Ā· parcel-bundler/parcel Ā· GitHub

@BOTBOT did you have a chance yet to try this?

Thanks for looking into this and testing it out. I havenā€™t tried just yet but it looks promising

by user 285903863339548673